<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外边距</title>
  <style>
      /*
        width:当前元素的宽度
        height:当前元素的高度
        border:当前元素的边框
        padding:当前元素边框与标签体内容的距离,称之为内边距
        margin:当前元素边框与父元素边框的距离,称之为外边距
      */
    .container{
      width:1000px;
      height:800px;
      background: pink;
      border: 1px solid purple;
      margin:0px auto;
    }
    .c1{
      width: 200px;
      height: 100px;
      background: green;
     /* margin-left: 100px;
      margin-top: 100px;
      margin-right: 100px;
      margin-bottom: 100px;*/
      /*  保证右边至少空出 200px*/
      margin: 100px 200px 300px 400px;
    }
    .c2{
      width: 200px;
      height: 100px;
      margin-left:400px;
      background: #bb7a2a;
    }
  </style>
</head>
<body>
<div class="container" >
  <div class="c1"></div>
  <div class="c2"></div>
</div>
</body>
</html>